import request from '@/utils/request.js'

export const loadChannels = () => {
  return request({
    method: 'GET',
    url: '/app/v1_0/channels'
  })
}

// 添加频道用户
export const getChannels = (channel) => {
  return request({
    method: 'PATCH',
    url: '/app/v1_0/user/channels',
    data: {
      channels: [channel]
    }
  })
}

// 删除指定频道用户
export const deleteUserChannels = (id) => {
  return request({
    method: 'DELETE',
    url: '/app/v1_0/user/channels/' + id
  })
}
